package com.project.entity.sys;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;


/**
 * 操作日志
 * @author
 */
@Entity
@Table(name = "S_OPERATION_LOG") 
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicInsert
@DynamicUpdate
public class OperationLog extends BaseEntity {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6200381162479372793L;

	@Column(length = 10)	
	private String  type;//类型（0前台、1后台、2app端）
	
	@Column(length = 10)	
	private String operationType;//操作类型（change;add;other）
	
	@Column(length = 200)
	private String  tableModel;//实体类（写主要实体类例如:user）
	
	@Column
	private Long pkId; //主实体类id
	
	@Column(length = 100)
	private String  module;//模块（例如：项目-权利）
	
	@Column(length = 500)
	private String  content;//操作内容（例如：新增；修改；状态从待审核变为审核）
	
	@Column(length = 500)
	private String rmk;//备注
	
	@Column(length = 50)
	private String createUser;//创建人id
	
	@Column
	private Date createTime;//创建时间

	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getRmk() {
		return rmk;
	}

	public void setRmk(String rmk) {
		this.rmk = rmk;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getOperationType() {
		return operationType;
	}

	public void setOperationType(String operationType) {
		this.operationType = operationType;
	}

	public String getTableModel() {
		return tableModel;
	}

	public void setTableModel(String tableModel) {
		this.tableModel = tableModel;
	}

	public Long getPkId() {
		return pkId;
	}

	public void setPkId(Long pkId) {
		this.pkId = pkId;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public OperationLog(String type, String operationType, String tableModel, Long pkId, String module, String content,
			String rmk, String createUser, Date createTime) {
		super();
		this.type = type;
		this.operationType = operationType;
		this.tableModel = tableModel;
		this.pkId = pkId;
		this.module = module;
		this.content = content;
		this.rmk = rmk;
		this.createUser = createUser;
		this.createTime = createTime;
	}

	public OperationLog(){

	}
	
}
